<template>
  <div id="views">
    <div class="content">
      <router-link to="/edit_transaction_pws" v-if='hasPws == true'>
        <span>修改交易密码</span>
        <img src="../../common/imgs/arrowright.png" alt="" class="right">
      </router-link>
     <router-link to="/set_transaction_pws" v-if='hasPws == false'>
        <span>设置交易密码</span>
        <img src="../../common/imgs/arrowright.png" alt="" class="right">
      </router-link>
      <a href="javascript:;" v-if='hasPws == true' @click="showdl()">
        <span>忘记交易密码</span>
        <img src="../../common/imgs/arrowright.png" alt="" class="right">
        <span class="rightTxt">找回</span>
      </a>
    </div>
    <p class="safeToast">保护账户安全，余额提现需设置交易密码</p>
    <dia-log ref="dl" v-bind:msg="msg"></dia-log>
  </div>
</template>

<script>
  // import { isRelNameVerify } from '../../http/api';
  export default {
    name: 'setting',
    data () {
      return {
        msg:'找回交易密码请打开APP操作',
        hasPws : this.$route.query.setPws == 'false' || this.$route.query.setPws == false ? false : true ,//是否设置交易密码
      }
    },
    components: {
      DiaLog: resolve => { require(['../../components/dialog'], resolve) },
    },
    methods:{
      showdl(){
        this.$refs.dl.dialogShow();
      }
    }
  }
</script>
<style type="text/less" lang='less' scoped>
  #views{
    padding:0.41rem 0.3rem;background: #F8F8F8;
    .content{
      background: #fff;border-radius: 0.04rem;padding-left: 0.36rem;padding-right: 0.36rem;;
      >a{
        display: inline-block;width:100%;padding: 0.36rem 0;font-size: 0.28rem;text-align: left;line-height: 0.34rem;border-bottom: 0.01rem solid#E5E5E5;
        .right{
          float: right;height:0.25rem;margin-top: 0.03rem;
        }
        .rightTxt{
          float: right;color:#777D84;font-size: 0.28rem;padding-right: 0.2rem;line-height: 0.34rem;;
         }
         .passimg{
           height:0.34rem;float: right;margin-right: 0.12rem;;
         }
      }
      >a:last-child{
        border-bottom: 0;
      }
    }
    .safeToast{
      color: #777D84;font-size: 0.24rem;padding:0 0.36rem;padding-top: 0.3rem;text-align: left;
    }

  }
</style>
